package com.ruoyi.bargain.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bargain.mapper.BargainAwardsMapper;
import com.ruoyi.bargain.domain.BargainAwards;
import com.ruoyi.bargain.service.IBargainAwardsService;
import com.ruoyi.common.support.Convert;

/**
 * 领取奖品记录 服务层实现
 * 
 * @author lzy
 * @date 2019-03-07
 */
@Service
public class BargainAwardsServiceImpl implements IBargainAwardsService 
{
	@Autowired
	private BargainAwardsMapper bargainAwardsMapper;

	/**
     * 查询领取奖品记录信息
     * 
     * @param id 领取奖品记录ID
     * @return 领取奖品记录信息
     */
    @Override
	public BargainAwards selectBargainAwardsById(String id)
	{
	    return bargainAwardsMapper.selectBargainAwardsById(id);
	}
	
	/**
     * 查询领取奖品记录列表
     * 
     * @param bargainAwards 领取奖品记录信息
     * @return 领取奖品记录集合
     */
	@Override
	public List<BargainAwards> selectBargainAwardsList(BargainAwards bargainAwards)
	{
	    return bargainAwardsMapper.selectBargainAwardsList(bargainAwards);
	}
	
    /**
     * 新增领取奖品记录
     * 
     * @param bargainAwards 领取奖品记录信息
     * @return 结果
     */
	@Override
	public int insertBargainAwards(BargainAwards bargainAwards)
	{
	    return bargainAwardsMapper.insertBargainAwards(bargainAwards);
	}
	
	/**
     * 修改领取奖品记录
     * 
     * @param bargainAwards 领取奖品记录信息
     * @return 结果
     */
	@Override
	public int updateBargainAwards(BargainAwards bargainAwards)
	{
	    return bargainAwardsMapper.updateBargainAwards(bargainAwards);
	}

	/**
     * 删除领取奖品记录对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteBargainAwardsByIds(String ids)
	{
		return bargainAwardsMapper.deleteBargainAwardsByIds(Convert.toStrArray(ids));
	}
	
}
